#pragma once

#include "space\reference_tracker.h"
#include "space\event_dispatcher.h"
#include "space\singleton.h"
#include <fstream>
#include "space\i_engine.h"

#include <boost/timer.hpp>

namespace space {


	namespace engines {
		class client : public i_engine, 
			public reference_tracker<client>,
			public singleton<client>
			{
		public:
				// core functions
				result run();
				result shutdown();
				result pause();
				result unpause();

				// Custom accessors
				E_ENGINE_STATE state();

				client();
				~client();

		protected:
			void _initialize_text_log(void);
			std::ofstream _log_stream;
			shared_ptr<space::debug::logger> _logger;

		// MANAGERS
		public:

		public:
			DECLARE_MEMBER(bool, paused);
			DECLARE_MEMBER(bool, running);
			DECLARE_MEMBER(bool, shutdown);
		};
	};
};